class AddDefaultHouseTypeNameIntoCategories < ActiveRecord::Migration

  class Category < ActiveRecord::Base ; end
  
  def self.up
    ["hotes", "bungalo"].each do |name|
      c = Category.find_by_name(name)
      c.update_attribute(:house_type_name, "rent")
    end
    
    c = Category.find_by_name("villy")
    c.update_attribute(:house_type_name, "all")

    ["earth", "buis"].each do |name| 
      c = Category.find_by_name(name)
      c.update_attribute(:house_type_name, "sale")
    end
  end

  def self.down
  end
end
